<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<h2>当前计数：{{counter}}</h2>
			<button v-on:click="increment">+</button>
			<button v-on:click="decrement">-</button>
		</div>
		<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script>
			const app = new Vue({
				el: '#app',
				data: {
					counter: 0
				},
				methods: {
					increment: function() {
						this.counter++
					},
					decrement: function(){
						this.counter--
					}
					
				}
			})
			
		</script>
	</body>
</html>
